home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15492 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: cpsc.ucalgary.ca!davidt
  2. From: davidt@cpsc.ucalgary.ca (David Taylor)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Preprocessor derectives is insufficient for me
  5. Date: 5 Apr 1996 21:48:56 GMT
  6. Organization: University of Calgary CPSC
  7. Message-ID: <4k44g8$ikb@linux.cpsc.ucalgary.ca>
  8. References: <ABY08OnW53@npn-price.pskov.su>
  9. NNTP-Posting-Host: bh.cpsc.ucalgary.ca
  10.  
  11.  
  12. In article <ABY08OnW53@npn-price.pskov.su>,
  13. Dmitry Y. Pugachev <ivl@npn-price.pskov.su> wrote:
  14. >Hello all!
  15. >
  16. >Just look at this code
  17. >
  18. >#define DECLARE_CLASS(first_class,second_class,name_class)     \
  19. >class name_class : virtual public first_class , virtual public second_class     \
  20. >{       \
  21. >public: \
  22. >        name_class();   \
  23. >        ~name_class();  \
  24. >public: \
  25. >        virtual base* operator&(classA&) \
  26. >        virtual base* operator&(classB&) \
  27. >
  28. >                . . .
  29. >
  30. >        virtual base* operators&(classN&) \
  31. >};
  32. >
  33. >I have to filter some operations I don't need in specific name_class.
  34. >But a compiler don't allow to use #if in another #define statement :(
  35. >
  36. >May be there is a way to solve my problem ?
  37. >
  38.  
  39. I would recommend using an awk or perl script to produce the code.
  40.  
  41. -- 
  42. Andrew Taylor     |email: davidt@cpsc.ucalgary.ca
  43.                   |www:   http://www.cpsc.ucalgary.ca/~davidt
  44.